package ke07.pm.template.reihe2;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.ArrayList;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class HundredItemBagTest {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testSize() {
		HundredItemBag<Double> hib = new HundredItemBag<Double>();
		assertEquals(0, hib.size());
		hib.add(2.0);
	}

	@Test
	public void testAdd() {
		HundredItemBag<String> hib = new HundredItemBag<String>();
		// ArrayList<String> al = new ArrayList<String>();
		assertFalse(hib.contains("Hallo"));
		hib.add("Hallo");
		assertTrue(hib.contains("Hallo"));

	}

	@Test
	public void testContains() {

		ArrayList<String> al = new ArrayList<String>();
		al.add("Hallo");
		assertTrue(al.contains("Hallo"));
		assertFalse(al.contains("Hello"));
	}
}
